import { auxiliary } from "@/api/request";

const get = (parameter: any) => {
  return auxiliary({
    url: `/basedata`,
    method: "get",
    params: parameter,
  });
};

const add = (data: object) => {
  return auxiliary({
    url: `/basedata`,
    method: "post",
    data: data,
    headers: { 'Content-Type': 'multipart/form-data;charset=UTF-8' },
  });
};

const del = (id: number) => {
  return auxiliary({
    url: `/basedata/delete/${id}`,
    method: "delete",
  });
};

const update = (data: any) => {
  return auxiliary({
    url: `/basedata/update`,
    method: "post",
    data: data,
  });
};

export default {
  get,
  add,
  del,
  update,
};
